// 统一管理项目接口地址
import axios from "@/request/request";
import qs from 'qs'
// 获取精品推荐接口文档
export const JingpinAPI = () => axios.get("/products/recommend")
// 获取热门推荐接口文档
export const RemenAPI = () => axios.get("/products/hot")
// 发送短信验证码   params = {}
export const SenSMAPI = (params) => axios.post("/sendSMS", qs.stringify(params))
// 手机登录
export const PhoneReginAPI = (params) => axios.post("/phoneRegin", qs.stringify(params))
// 微信登录（这个接口必须用qs对数据进行格式化）
export const WeixinLoginApi = (params) => axios.post(`/wechatUsers/PCLogin`, qs.stringify(params));
// 手机绑定微信请求
export const wechatUsersApi = (params) => axios.post(`/wechatUsers/binding`, qs.stringify(params));
// 获取用户信息
export const UserProfilesAPI = () => axios.get("/shop/userProfiles")
// 商品详情
export const GoodsDetalisAPI = (params) => axios.get(`/products/${params}`)
// 加入购物车
export const AddCartsApi = (params) => axios.post('/shop/carts/add', qs.stringify(params));
// 全部商品
export const ProductsAPI = (params) => axios.get("/products", { params })
// 查看购物车
export const CartDataAPI = () => axios.get("/shop/carts")
// 删除购物车
export const DeleteDataAPI = (params) => axios.delete(`/shop/carts?productIds=${params}`)









// console.log('序列化:',qs.stringify({a:10,b:100}));